Set x {
    x.shape = CircleTransform {
        strokeWidth : 0
    }

    x.text = TextTransform {
      scaleX : 1.0
      scaleY : 1.0
      string : x.label
    }

    x.origin = CircleTransform {
      r : 5.0
      strokeWidth : 0
      x : 0.0
      y : 0.0
    }

    x.labelFn = encourage containsPoly(x.shape, x.text)
    x.labelLocFn = encourage nearPoint(x.text, x.shape.x, x.shape.y, 6.0)
    x.maxSizeFn = encourage maximumSize(x.shape, 300.0)
    x.minSizeFn = encourage minimumSize(x.shape, 80.0)
    x.onCanvasFn = encourage polyOnCanvas(x.shape)
    LOCAL.layering  = x.shape below x.text
}

Set x; Set y
where IsSubset(x, y) {
    LOCAL.containFn = encourage containsPolyPad(y.shape, x.shape, 10.0)
    LOCAL.labelFn = encourage disjointPoly(y.text, x.shape)
    LOCAL.layering  = x.shape above y.shape
    LOCAL.layering1  = y.text below x.shape
}

Set x; Set y
where Intersect(x, y) {
    LOCAL.disjointFn = encourage disjointPolyOfs(y.shape, x.shape, -30.0)
    LOCAL.layering  = x.shape above y.shape
    LOCAL.layering1  = y.text below x.shape
    LOCAL.labelFn1  = encourage disjointPoly(y.text, x.shape)
    LOCAL.labelFn2  = encourage disjointPoly(x.text, y.shape)
}

Set x; Set y
where NotIntersecting(x, y) {
    LOCAL.posFn = encourage disjointPolyPad(x.shape, y.shape, 10.0)
}